import {request} from './request.js'

export function getTeamDetailAPI(id){
	return request({
		url: `/api/team/getTeamInfoById?id=${id}`,
		method: 'post'
	})
}

export function isTeamApi(userId,tags){
	return request({
		url: `/api/team/isEnrollTeam?userId=${userId}&tags=${tags}`,
		method: 'get'
	})
}

export function joinOrLeaveTeamApi(userId,teamId){
	return request({
		url: `/api/team/joinOrLeaveTeam?userId=${userId}&teamId=${teamId}`,
		method:'get'
	})
}

export function addTeamApi(team){
	return request({
		url: '/api/team/add',
		method: 'post',
		data: team
	})
}

export function getMyTeamByUserIdApi(id){
	return request({
		url: `/api/team/getMyTeamByUserId?userId=${id}`,
		method: 'get'
	})
}

export function getTeamByUserIdApi(id){
	return request({
		url: `/api/team/getTeamByUserId?userId=${id}`,
		method: 'get'
	})
}